package com.zg.paging3.activity.java.model;

import android.os.Build;
import android.text.TextUtils;

import androidx.annotation.RequiresApi;

import java.util.List;
import java.util.Objects;

/***
 * 创建时间：2020/5/1 9:50
 * 创建人：10850
 * 功能描述：文章 实体
 */
public class ArticleBeanInJava {

    /**
     * apkLink :
     * audit : 1
     * author :
     * canEdit : false
     * chapterId : 502
     * chapterName : 自助
     * collect : false
     * courseId : 13
     * desc :
     * descMd :
     * envelopePic :
     * fresh : true
     * id : 13069
     * link : https://juejin.im/post/5e84c202f265da47dc4cc01f
     * niceDate : 2小时前
     * niceShareDate : 2小时前
     * origin :
     * prefix :
     * projectLink :
     * publishTime : 1587949104000
     * selfVisible : 0
     * shareDate : 1587949104000
     * shareUser : 躬行之
     * superChapterId : 494
     * superChapterName : 广场Tab
     * tags : []
     * title : Android Jetpack组件之Lifecycle-Aware组件使用及源码解析
     * type : 0
     * userId : 23270
     * visible : 1
     * zan : 0
     */

    private String apkLink;
    private int audit;
    private String author;
    private boolean canEdit;
    private int chapterId;
    private String chapterName;
    private boolean collect;
    private int courseId;
    private String desc;
    private String descMd;
    private String envelopePic;
    private boolean fresh;
    private int id;
    private String link;
    private String niceDate;
    private String niceShareDate;
    private String origin;
    private String prefix;
    private String projectLink;
    private long publishTime;
    private int selfVisible;
    private long shareDate;
    private String shareUser;
    private int superChapterId;
    private String superChapterName;
    private String title;
    private int type;
    private int userId;
    private int visible;
    private int zan;
    private List<TagsBean> tags;

    public String getApkLink() {
        return apkLink;
    }

    public void setApkLink(String apkLink) {
        this.apkLink = apkLink;
    }

    public int getAudit() {
        return audit;
    }

    public void setAudit(int audit) {
        this.audit = audit;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public boolean isCanEdit() {
        return canEdit;
    }

    public void setCanEdit(boolean canEdit) {
        this.canEdit = canEdit;
    }

    public int getChapterId() {
        return chapterId;
    }

    public void setChapterId(int chapterId) {
        this.chapterId = chapterId;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public boolean isCollect() {
        return collect;
    }

    public void setCollect(boolean collect) {
        this.collect = collect;
    }

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDescMd() {
        return descMd;
    }

    public void setDescMd(String descMd) {
        this.descMd = descMd;
    }

    public String getEnvelopePic() {
        return envelopePic;
    }

    public void setEnvelopePic(String envelopePic) {
        this.envelopePic = envelopePic;
    }

    public boolean isFresh() {
        return fresh;
    }

    public void setFresh(boolean fresh) {
        this.fresh = fresh;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getNiceDate() {
        return niceDate;
    }

    public void setNiceDate(String niceDate) {
        this.niceDate = niceDate;
    }

    public String getNiceShareDate() {
        return niceShareDate;
    }

    public void setNiceShareDate(String niceShareDate) {
        this.niceShareDate = niceShareDate;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getProjectLink() {
        return projectLink;
    }

    public void setProjectLink(String projectLink) {
        this.projectLink = projectLink;
    }

    public long getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(long publishTime) {
        this.publishTime = publishTime;
    }

    public int getSelfVisible() {
        return selfVisible;
    }

    public void setSelfVisible(int selfVisible) {
        this.selfVisible = selfVisible;
    }

    public long getShareDate() {
        return shareDate;
    }

    public void setShareDate(long shareDate) {
        this.shareDate = shareDate;
    }

    public String getShareUser() {
        return shareUser;
    }

    public void setShareUser(String shareUser) {
        this.shareUser = shareUser;
    }

    public int getSuperChapterId() {
        return superChapterId;
    }

    public void setSuperChapterId(int superChapterId) {
        this.superChapterId = superChapterId;
    }

    public String getSuperChapterName() {
        return superChapterName;
    }

    public void setSuperChapterName(String superChapterName) {
        this.superChapterName = superChapterName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getVisible() {
        return visible;
    }

    public void setVisible(int visible) {
        this.visible = visible;
    }

    public int getZan() {
        return zan;
    }

    public void setZan(int zan) {
        this.zan = zan;
    }

    public List<TagsBean> getTags() {
        return tags;
    }

    public void setTags(List<TagsBean> tags) {
        this.tags = tags;
    }

    public static class TagsBean {
        /**
         * name : 公众号
         * url : /wxarticle/list/417/1
         */

        private String name;
        private String url;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ArticleBeanInJava that = (ArticleBeanInJava) o;
        return audit == that.audit &&
                canEdit == that.canEdit &&
                chapterId == that.chapterId &&
                collect == that.collect &&
                courseId == that.courseId &&
                fresh == that.fresh &&
                id == that.id &&
                publishTime == that.publishTime &&
                selfVisible == that.selfVisible &&
                shareDate == that.shareDate &&
                superChapterId == that.superChapterId &&
                type == that.type &&
                userId == that.userId &&
                visible == that.visible &&
                zan == that.zan &&
                TextUtils.equals(apkLink, that.apkLink) &&
                TextUtils.equals(author, that.author) &&
                TextUtils.equals(chapterName, that.chapterName) &&
                TextUtils.equals(desc, that.desc) &&
                TextUtils.equals(descMd, that.descMd) &&
                TextUtils.equals(envelopePic, that.envelopePic) &&
                TextUtils.equals(link, that.link) &&
                TextUtils.equals(niceDate, that.niceDate) &&
                TextUtils.equals(niceShareDate, that.niceShareDate) &&
                TextUtils.equals(origin, that.origin) &&
                TextUtils.equals(prefix, that.prefix) &&
                TextUtils.equals(projectLink, that.projectLink) &&
                TextUtils.equals(shareUser, that.shareUser) &&
                TextUtils.equals(superChapterName, that.superChapterName) &&
                TextUtils.equals(title, that.title) &&
                Objects.equals(tags, that.tags);
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public int hashCode() {
        return Objects.hash(apkLink, audit, author, canEdit, chapterId, chapterName, collect, courseId, desc, descMd, envelopePic, fresh, id, link, niceDate, niceShareDate, origin, prefix, projectLink, publishTime, selfVisible, shareDate, shareUser, superChapterId, superChapterName, title, type, userId, visible, zan, tags);
    }
}
